package com;

import com.core.Downloader;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        //下载地址
        String url = null;
        if (args == null || args.length == 0) {
            do {
                System.out.print("请输入下载链接：");
                Scanner scanner = new Scanner(System.in);
                url = scanner.next();
            } while (url == null);

        } else {
            url = args[0];
        }
        Downloader downloader = new Downloader();
        downloader.download(url);
    }
}